package com.redside.model.lookup;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.redside.model.list.OptionsBean;

/**
 * This class represents the lookup class that holds the name/value pairs
 * for business category types.
 * 
 * @author <a href="mailto:pchapman@redsidesoftware.com">Peter Chapman</a>
 */

@Entity
@Table(name="corr_type_lkp")
public class CorrTypeLkp implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	
	@Id
    @Column( name="corr_type_id", unique=true, nullable=false, updatable=false )
	private Long corrTypeId;
	
	@Column(name="description",nullable=false,length=50)
	private String description;

	public CorrTypeLkp() {
	}

	public CorrTypeLkp(String description) {
		this.description = description;
	}
	
    public CorrTypeLkp(Long id, String description) {
        this.corrTypeId=id;
        this.description = description;
    }	
	
	public CorrTypeLkp(OptionsBean option){
        this.corrTypeId=Long.valueOf(option.getId());
        this.description=option.getValue();
	}

	public Long getCorrTypeId() {
		return this.corrTypeId;
	}

	public void setCorrTypeId(Long corrTypeId) {
		this.corrTypeId = corrTypeId;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
}
